import 'package:flutter/material.dart';

/// @author jltxseo
///         Created by junlintianxia on 2020/04/22.

class ButtonRoute extends StatefulWidget {
  const ButtonRoute({super.key});

  @override
  ButtonRouteState createState() => ButtonRouteState();
}

class ButtonRouteState extends State<ButtonRoute> {

  void _onPressed() {
    print("button pressed");
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        ElevatedButton(
          child: Text("normal"),
          onPressed: () => {},
        ),
        OutlinedButton(
          child: Text("normal"),
          onPressed: () => {},
        ),
        IconButton(
          icon: Icon(Icons.thumb_up),
          onPressed: () => {},
        ),
        TextButton(
          style: TextButton.styleFrom(
            foregroundColor: Colors.red[700],
            backgroundColor: Colors.blue,
            shadowColor: Colors.grey,
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
          ),
          onPressed: () {},
          child: Text("Submit"),
        ),
        TextButton(
          style: TextButton.styleFrom(
            foregroundColor: Colors.red[700],
            backgroundColor: Colors.blue,
            shadowColor: Colors.grey,
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
          ),
          onPressed: () {},
          child: Text("Submit"),
        ),
        ElevatedButton.icon(
          icon: Icon(Icons.send),
          label: Text("发送"),
          onPressed: _onPressed,
        ),
        OutlinedButton.icon(
          icon: Icon(Icons.add),
          label: Text("添加"),
          onPressed: _onPressed,
        ),
        TextButton.icon(
          icon: Icon(Icons.info),
          label: Text("详情"),
          onPressed: _onPressed,
        ),
        // FlatButton.icon(
        //   icon: Icon(Icons.info),
        //   label: Text("详情"),
        //   onPressed: _onPressed,
        // ),
      ],
    );
  }
}
